<template>
  <div class="tabs">
    <div class="tabs-title">
      <span>{{ translate('我的待阅事项') }}</span>
      <span class="count">{{ msgreadcount }}</span>
      <span class="more" @click="moreFn">
        {{ translate('更多') }}
        <vab-icon icon="arrow-drop-right-line" />
      </span>
    </div>
    <el-table :data="listseenarr" style="width: 100%">
      <el-table-column
        :label="translate('待阅标题')"
        prop="PostUserName"
        width="180"
      />
      <el-table-column :label="translate('来源')" prop="CreateUserName" />
      <el-table-column :label="translate('创建时间')" prop="CreateDate" />
    </el-table>
  </div>
</template>

<script>
  import { translate } from '@/i18n'
  export default defineComponent({
    props: {
      listseenarr: {
        type: Array,
        default: () => {
          return []
        },
      },
      msgreadcount: {
        type: Number,
        default: 0,
      },
    },
    data() {
      return {
        tableData: [],
      }
    },
    methods: {
      translate(row) {
        return translate(row)
      },
      moreFn() {
        this.$router.push({
          path: '/instancelist',
          query: {
            IsSeen: true,
          },
        })
      },
    },
  })
</script>

<style lang="scss" scoped>
  .tabs {
    background: #ffffff;
    padding: 20px;
    .tabs-title {
      position: relative;
      color: #000;
      font-weight: 600;
      padding-bottom: 15px;
      font-size: 14px;

      .more {
        position: absolute;
        top: 0;
        right: 0;
        cursor: pointer;
      }
      .count {
        display: inline-block;
        border: 1px solid #f31434;
        color: red;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        margin-left: 5px;
        text-align: center;
      }
    }
  }
</style>
